package com.itheima.mygenericity.genericityclass;

import java.util.Arrays;

public class GenericityClassTest {
    public static void main(String[] args) {
        Box<String> box1 = new Box<>();
        box1.setElement("aaaaa");
        String element1 = box1.getElement();
        System.out.println(element1);

        Box<Integer> box2 = new Box<>();
        box2.setElement(123456);
        Integer element2 = box2.getElement();
        System.out.println(element2);

        Box<int[]> box3 = new Box<>();
        int[] arr = {1,2,3};
        box3.setElement(arr);
        int[] element3 = box3.getElement();
        System.out.println(Arrays.toString(element3));
    }
}
